<div class="post-h">{{helper:lang line="global:export_file" }}</div>
<div class="container">
    <div id="filters">
    <?php echo form_open("",'id="form_submit"');?>	
    	<?php echo form_dropdown('id_room',$room,$id_room,'class="chosen" style="min-width:180px"'  ) ?>
        <?php echo form_dropdown('year',array(''=>lang('salary:year')) + $year,date("Y"),'class="chosen" style="min-width:180px"'  ) ?>
        <?php echo form_dropdown('month',array(''=>'---'.lang('global:all').'---') + $month,date("m"),'class="chosen" style="min-width:180px"'  ) ?>
        <input class="print" type="submit" style="display:none" />
    <?php echo form_close();?>
    </div>
    <div id="filter-stage" style="margin-top:10px;">
    	{{template:partial file= 'list'}}
    </div>	
</div>
<script type="text/javascript">
$(window).load(function(){
	$('.export_excel a').click(function(){
		$get_form = $("form").serialize();
		window.location.assign("<?php echo site_url("emp_profile/export_salary/export_excel")?>?"+$get_form);
	});
	$('.export_excelTHBS a').click(function(){
		$get_form = $("form").serialize();
		window.location.assign("<?php echo site_url("emp_profile/export_salary/export_excelTH")?>?"+$get_form);
	});
	$('.export_excelTHBL a').click(function(){
		$get_form = $("form").serialize();
		window.location.assign("<?php echo site_url("emp_profile/export_salary/export_excelTH/BL")?>?"+$get_form);
	});
	$('.export_excelbank a').click(function(){
		$get_form = $("form").serialize();
		window.location.assign("<?php echo site_url("emp_profile/export_salary/export_excelbank")?>?"+$get_form);
	});
	$('ul.actionBtn li.run').click(function(){
		click_print();
	});
});
function click_print(){
	$('#body').addClass('null');
	$('.clr,#header,#filters,footer,#toolBar,.post-h,title').remove();
	$('.tbl').css('width','95%','padding-bottom','30px');
	window.print();
	window.onfocus=function(){ location.reload();}
}
</script>
<style>
.null{
	background:none !important;
}
</style>